<script lang="ts" setup name="App">
import Preson from "./components/Preson.vue";
import {ref,onBeforeMount,onMounted,onBeforeUpdate,onUpdated,onBeforeUnmount,onUnmounted} from "vue";
let isShow = ref(true)

//创建
console.log('父--创建')

//挂载前
onBeforeMount(()=>{
  console.log('父--挂载前')
})
//挂载后
onMounted(()=>{
  console.log('父--挂载后')
})
//更新前
onBeforeUpdate(()=>{
  console.log('父--更新前')
})
//更新后
onUpdated(()=>{
  console.log('父--更新后')
})
//卸载前
onBeforeUnmount(()=>{
  console.log('父--卸载前')
})
//卸载后
onUnmounted(()=>{
  console.log('父--卸载后')
})
</script>

<template>
  <div id="app">
    <Preson v-if="isShow" />
  </div>
</template>

